<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp"%>
<script>
	$(document).ready(function() {
		//聚焦第一个输入框
		$("#name").focus();
		//为inputForm注册validate函数
		$("#inputForm").validate({
			rules : {
				box : "required",
				goodsQrContent : "required",
				goodsQr : "required",
				path : "required",
				url : "required",
				integralQr : "required",
				integralQrContent : "required",
				memo : "required"
			}
		});
	});
</script>
<form id="inputForm" class="well form-inline" action="${ctx}/adoms/qrGoodsCode/save" method="post">
	<input type="hidden" name="id" value="${qrGoodsCode.id}" />
	<table class="table table-striped table-bordered table-condensed">
		<thead>
			<i class="icon-flag"></i>
			<strong>商品二维码表单</strong>
		</thead>
		<tr>
			<td class="span2">所属箱码:</td>
			<td>
				<select id="box" name="box.id">
					<c:forEach items="${boxList }" var="box">
						<option value="${box.id }" <c:if test="${qrGoodsCode.box.id == box.id }">selected</c:if>>${box.id}.${box.qrName }</option>
					</c:forEach>
				</select>
			</td>
		</tr>
		<tr>
			<td>货物二维码内容:</td>
			<td>
				<textarea id="goodsQrContent" name="goodsQrContent" rows="2" class="span6">${qrGoodsCode.goodsQrContent}</textarea>
			</td>
		</tr>
		<tr>
			<td>货物二维码:</td>
			<td>
				<input id="goodsQr" name="goodsQr" type="text" value="${qrGoodsCode.goodsQr}" size="30" maxlength="80" />
			</td>
		</tr>
		<tr>
			<td>物理存放地址:</td>
			<td>
				<input id="path" name="path" type="text" value="${qrGoodsCode.path}" size="30" maxlength="80" />
			</td>
		</tr>
		<tr>
			<td>URL:</td>
			<td>
				<input id="url" name="url" type="text" value="${qrGoodsCode.url}" size="30" maxlength="80" />
			</td>
		</tr>
		<tr>
			<td>积分二维码:</td>
			<td>
				<input id="integralQr" name="integralQr" type="text" value="${qrGoodsCode.integralQr}" size="30" maxlength="80" />
			</td>
		</tr>
		<tr>
			<td>积分二维码内容:</td>
			<td>
				<textarea id="integralQrContent" name="integralQrContent" rows="2" class="span6">${qrGoodsCode.integralQrContent}</textarea>
			</td>
		</tr>
		<tr>
			<td>备注:</td>
			<td>
				<textarea id="memo" name="memo" rows="4" class="span6">${qrGoodsCode.memo}</textarea>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<input class="btn" type="submit" value="提交" />
				&nbsp;
				<input class="btn" type="button" value="返回" back="back" />
			</td>
		</tr>
	</table>
</form>
